'use strict';
var React = require('react');
var reactDom = require('react-dom/server');
var reactRedux = require('react-redux');
var configureStore = require('../public/javascripts/stores/index.js');
var Provider = reactRedux.Provider;
const store = configureStore();
var HkfsLogin = require('../public/javascripts/containers/pc/HkfsLogin.jsx');
var ModelRender = require('./modelRender.jsx');
var actions = require('../public/javascripts/actions/userOperation');

exports.RenderFunc = (renderCallBack)=> {
    if (renderCallBack) {
        var modelRender = new ModelRender();
        var main = reactDom.renderToString(
            <Provider store={store}>
                <HkfsLogin/>
            </Provider>
        );
        var initializeStore = JSON.stringify(store.getState());
        renderCallBack(modelRender.headerRender(), modelRender.loginAndRegisterBarRender(), modelRender.loginAndRegisteFooterRender(), main, initializeStore);
    }
};